#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START libcap

# No out of the source build
rm -rf build/libcap
cp -a libcap build/
reset_mtime build/libcap build/libcap/Makefile

make -j${JOBS} -C build/libcap \
	CROSS_COMPILE="${TARGET}-" \
	BUILD_CC='gcc' \
	GOLANG='no' \
	PAM_CAP='no' \
	prefix="$prefix" \
	lib="$target_libdir"

make -j${JOBS} -C build/libcap \
	CROSS_COMPILE="${TARGET}-" \
	BUILD_CC='gcc' \
	GOLANG='no' \
	prefix="$prefix" \
	lib="$target_libdir" \
	PAM_CAP='no' \
	DESTDIR="$stage" \
	install

rm -rf build/libcap

# RECIPE END libcap
